package yl.hs.bmipfull.pojo.salemanage;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.lang.Nullable;
import yl.hs.bmipfull.annotations.DBField;
import yl.hs.bmipfull.annotations.DBTable;
import yl.hs.bmipfull.pojo.BaseEntity;

import java.util.Date;

/**
 * 作用:  联系人实体类<br/>
 * 创建时间: 2021年05月19日 11时16分38秒 <br/>
 *
 * @author 谢东
 */
@DBTable(disName = "联系人", mapCode = "linker_info")
public class LinkerInfoEntity extends BaseEntity {

    /**
     * 主键
     */
    @Nullable
    private Long id;
    /**
     * 编号
     */
    @DBField(disName = "联系人编号", mapCode = "sn", isSerialNumber = true, isRequire = true, snPrefix = "LINK")
    private String sn;
    @DBField(disName = "客户名称")
    private String customerName;
    /**
     * 联系人姓名
     */
    @DBField(disName = "联系人姓名")
    private String fullName;
    /**
     * 联系人类别
     */
    private short category;
    /**
     * 联系人姓名拼音
     */
    private String fullNamePY;
    /**
     * 性别
     */
    @DBField(disName = "性别")
    private boolean gender;
    /**
     * 年龄
     */
    //TODO: 2021-5-26 15:55:55 删除年龄通过生日进行计算
    private Short age;
    /**
     * 学历
     */
    @DBField(disName = "学历")
    private Short education;
    /**
     * 联系人职位
     */
    @DBField(disName = "联系人职位")
    private String position;
    /**
     * 联系人职位拼音
     */
    private String positionPY;
    /**
     * 联系人电话
     */
    @DBField(disName = "联系人电话")
    private String mobilePhone;
    /**
     * 联系人生日
     */
    @DBField(disName = "联系人生日")
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT-8")
    private Date birthday;
    /**
     * 联系人爱好
     */
    @DBField(disName = "联系人爱好")
    private String bentInfo;
    /**
     * 联系人QQ
     */
    @DBField(disName = "联系人QQ")
    private String qq;
    /**
     * 联系人来源
     */
    @DBField(disName = "联系人来源")
    private String linkFrom;
    /**
     * 备注
     */
    @DBField(disName = "备注")
    private String remark;
    /**
     * 状态
     */
    private Short state;

    /**
     * 主数据编号
     */
    private String custSn;
    /**
     * 主数据类型
     */
    private Short custType;
    /**
     * 联系人微信
     */
    @DBField(disName = "联系人微信")
    private String wechat;
    /**
     * 联系人邮箱
     */
    @DBField(disName = "联系人邮箱")
    private String email;
    /**
     * 联系人部门
     */
    @DBField(disName = "联系人部门")
    private String department;
    /**
     * 联系人在职状态
     */
    @DBField(disName = "联系人在职状态")
    private boolean jobStatus;

    @DBField(disName = "手机注册码")
    private String phoneCode;


    /**
     * 公司名称
     */
    private String companyName;

    @DBField(disName = "供应商名称")
    private String supplierName;


    private String password;
    private String realPassword;



    public short getCategory() {
        return category;
    }

    public void setCategory(short category) {
        this.category = category;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }
    @DBField(disName = "项目名称")
    private String projectName;

    private String openid;

    public String getRealPassword() {
        return realPassword;
    }

    public void setRealPassword(String realPassword) {
        this.realPassword = realPassword;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getCompanyName() {
        if (customerName!=null){
            return this.customerName;
        }else if(supplierName!=null){
            return this.supplierName;
        }else if(projectName!=null){
            return this.projectName;
        }
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public boolean isJobStatus() {
        return jobStatus;
    }

    public void setJobStatus(boolean jobStatus) {
        this.jobStatus = jobStatus;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getWechat() {
        return wechat;
    }

    public void setWechat(String wechat) {
        this.wechat = wechat;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return this.id;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public String getSn() {
        return this.sn;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public String getFullName() {
        return this.fullName;
    }

    public void setFullNamePY(String fullNamePY) {
        this.fullNamePY = fullNamePY;
    }

    public String getFullNamePY() {
        return this.fullNamePY;
    }

    public boolean isGender() {
        return gender;
    }

    public void setGender(boolean gender) {
        this.gender = gender;
    }

    public void setAge(Short age) {
        this.age = age;
    }

    public Short getAge() {
        return this.age;
    }

    public void setEducation(Short education) {
        this.education = education;
    }

    public Short getEducation() {
        return this.education;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getPosition() {
        return this.position;
    }

    public void setPositionPY(String positionPY) {
        this.positionPY = positionPY;
    }

    public String getPositionPY() {
        return this.positionPY;
    }

    public void setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone;
    }

    public String getMobilePhone() {
        return this.mobilePhone;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Date getBirthday() {
        return this.birthday;
    }

    public void setBentInfo(String bentInfo) {
        this.bentInfo = bentInfo;
    }

    public String getBentInfo() {
        return this.bentInfo;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getQq() {
        return this.qq;
    }

    public void setLinkFrom(String linkFrom) {
        this.linkFrom = linkFrom;
    }

    public String getLinkFrom() {
        return this.linkFrom;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getRemark() {
        return this.remark;
    }

    public void setState(Short state) {
        this.state = state;
    }

    public Short getState() {
        return this.state;
    }

    public String getCustSn() {
        return custSn;
    }

    public void setCustSn(String custSn) {
        this.custSn = custSn;
    }

    public Short getCustType() {
        return custType;
    }

    public void setCustType(Short custType) {
        this.custType = custType;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setPhoneCode(String phoneCode) {
        this.phoneCode = phoneCode;
    }

    public String getPhoneCode() {
        return phoneCode;
    }
}